part of 'bloc.dart';

class AppBlocState {
  const AppBlocState({
    required this.themeMode,
    required this.lightThemePrimaryColor,
    required this.darkThemePrimaryColor,
    required this.interfaceLanguageCode,
    required this.appInitialized,
    required this.appInForeground,
  });

  final ThemeMode themeMode;
  final LightThemePrimaryColor lightThemePrimaryColor;
  final DarkThemePrimaryColor darkThemePrimaryColor;
  final String? interfaceLanguageCode;
  final bool appInitialized;
  final bool appInForeground;

  AppBlocState copyWith({
    ThemeMode Function()? themeMode,
    LightThemePrimaryColor Function()? lightThemePrimaryColor,
    DarkThemePrimaryColor Function()? darkThemePrimaryColor,
    String? Function()? interfaceLanguageCode,
    bool Function()? appInitialized,
    bool Function()? appInForeground,
  }) {
    return AppBlocState(
      themeMode: themeMode == null ? this.themeMode : themeMode(),
      lightThemePrimaryColor:
          lightThemePrimaryColor == null ? this.lightThemePrimaryColor : lightThemePrimaryColor(),
      darkThemePrimaryColor:
          darkThemePrimaryColor == null ? this.darkThemePrimaryColor : darkThemePrimaryColor(),
      interfaceLanguageCode:
          interfaceLanguageCode == null ? this.interfaceLanguageCode : interfaceLanguageCode(),
      appInitialized: appInitialized == null ? this.appInitialized : appInitialized(),
      appInForeground: appInForeground == null ? this.appInForeground : appInForeground(),
    );
  }
}
